package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.trading.GoodsType;
import tech.aistar.mapper.trading.GoodsTypeMapper;
import tech.aistar.service.IGoodsTypeService;

import java.util.List;

/**
 * @author Ace
 * @version 1.0
 * @descriiption:本类用来演示:
 * @date 2019/10/5 0005.
 */
@Service
public class GoodsTypeServiceImpl implements IGoodsTypeService{
    @Autowired
    private GoodsTypeMapper goodsTypeMapper;


    @Override
    public List<GoodsType> findAll() {
        List<GoodsType> list=goodsTypeMapper.findAll();
        return list;
    }

    @Override
    public Integer findByName(String typeName) {
        Integer typeId=goodsTypeMapper.findByName(typeName);
        return typeId;
    }
}
